package com.bo.threadEnd;

/**
 * @Author: gpb
 * @Date: 2024/7/15 22:19
 * @Description:
 */
public class Stop {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(() -> {
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        });
        t.start();
        Thread.sleep(500);
        t.stop();
        System.out.println(t.getState());
    }
}
